package day1801;

import java.util.Objects;

public class day1802_1 {
    private String name ;
    private int age ;

    public day1802_1(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public day1802_1() {
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof day1802_1)) return false;
        day1802_1 day1802_1 = (day1802_1) o;
        return age == day1802_1.age &&
                Objects.equals(name, day1802_1.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }

    @Override
    public String toString() {
        return "day1802_1{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
